import request from './request';

// 分页查询应用类别
export function getCategoryPage(data) {
  return request({
    url: '/api/app/category/page',
    method: 'post',
    data
  });
}

// 获取所有应用类别
export function getCategoryList() {
  return request({
    url: '/api/app/category/list',
    method: 'get'
  });
}

// 根据ID获取应用类别
export function getCategoryById(id) {
  return request({
    url: `/api/app/category/${id}`,
    method: 'get'
  });
}

// 新增应用类别
export function addCategory(data) {
  return request({
    url: '/api/app/category',
    method: 'post',
    data
  });
}

// 更新应用类别
export function updateCategory(data) {
  return request({
    url: '/api/app/category',
    method: 'put',
    data
  });
}

// 删除应用类别
export function deleteCategory(id) {
  return request({
    url: `/api/app/category/${id}`,
    method: 'delete'
  });
} 